clear
use "ReplicationData_ISQ_Promises.dta"

*Table 1
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region i.year lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_democracy lag_log_trade lag_rivalry_thompson lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.ccode postcw t t2 t3 log_cas us_gdp_growth lag_latency_pilot lag_nwcapability MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_troops adv_signal_last3   if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson lag_idealpoint_us_diff lag_rivalry_shared adv_signal_last3 lag_troops if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow_americas==1, vce(cluster id)

*Table 2
ologit us_intervene_amer i.ccode t t2 t3 postcw log_cas us_gdp_growth if sample_cow==1, vce(cluster id)
ologit us_intervene_amer i.ccode t t2 t3 postcw log_cas us_gdp_growth provocation_new3 lag_us_cinc lag_adversary_cinc if sample_cow==1, vce(cluster id)
nbreg withdrawal t t2 t3 postcw log_cas us_gdp_growth  if country=="France", vce(robust)
nbreg withdrawal t t2 t3 postcw log_cas us_gdp_growth provocation_new3 lag_us_cinc lag_adversary_cinc lag_MID_weighted_mean if country=="France", vce(robust)
reg goldstein_usa_soviet t log_cas us_gdp_growth if country=="France", vce(robust)
reg goldstein_usa_soviet t log_cas us_gdp_growth provocation_new3 lag_us_cinc lag_adversary_cinc lag_MID_weighted_mean if country=="France", vce(robust)


*Table A1
sutex statements_americas lag_log_gdp lag_latency_pilot lag_nwcapability lag_democracy lag_log_trade log_distance MID_movingavg_notinitiator MID_movingavg_aggressor log_cas us_gdp_growth warlength misery2 lag_adversary_cinc provocation_new3 lag_us_cinc log_distance log_distance_us lag_rivalry_thompson lag_rivalry_shared lag_log_gdppc democrat firstyear secondterm lag_troops if sample_cow==1, labels minmax nobs

*Table A2
pwcorr statements_americas visits assurances_weis weis_cns lag_troops if sample_cow==1 & postcw==0

*Table A3
pwcorr statements_americas visits assurances_kinglowe visit_kinglowe lag_troops if sample_cow==1 & postcw==1

*Table A4
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_log_gdppc democrat firstyear secondterm lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_terrdisputes lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_cinc lag_troops adv_signal_last3  if sample_cow==1, vce(cluster id)
nbreg statements_americas lag_statements_americas MID_movingavg_notinitiator MID_movingavg_aggressor log_cas us_gdp_growth lag_adversary_cinc provocation_new3 lag_us_cinc adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster year)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3  if sample_cow==1 & democracy==1, vce(cluster id)
nbreg statements_net i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)


*Table A5
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_cinc lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 warlength us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas unemployment lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas inflation lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas unemployment inflation lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas misery2 lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas_5yrs us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)


*Table A6
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_atop==1, vce(cluster id)
nbreg statements_americas i.region i.year lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_democracy lag_log_trade lag_rivalry_thompson lag_rivalry_shared lag_troops adv_signal_last3 if sample_atop==1, vce(cluster id)
nbreg statements_americas i.ccode postcw t t2 t3 log_cas us_gdp_growth lag_latency_pilot lag_nwcapability MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_troops adv_signal_last3   if sample_atop==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson lag_idealpoint_us_diff lag_rivalry_shared lag_troops adv_signal_last3 if sample_atop==1, vce(cluster id)
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson lag_rivalry_shared lag_troops adv_signal_last3 if sample_atop_americas==1, vce(cluster id)



*Figure A1
bys year: egen annual_statements = mean(statements_americas) if sample_cow==1
label var annual_statements "Average Statements per Ally"
preserve
keep if country=="France"
graph twoway (line annual_statements year if year < 2011, connect(l) lwidth(thick) clpattern(solid)), ylabel(0(0.5)2) xlabel(1950(10)2010) xtick(1950(5)2010) graphregion(fcolor(white)) xtitle("Year") title("Average U.S. Statements")
restore


eststo clear
*Generating coefficients and standard errors for Figure 1*
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(log_cas=(0 2.397895 4.615120 6.908754 9.210440 9.903537)) atmeans noatlegend post coeflegend

preserve
gen order = _n
gen coef = .
gen se = .
replace coef = _b[1bn._at] if order==1
replace coef = _b[2._at] if order==2
replace coef = _b[3._at] if order==3
replace coef = _b[4._at] if order==4
replace coef = _b[5._at] if order==5

nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(log_cas=(0 2.397895 4.615120 6.908754 9.210440 9.903537)) atmeans post coeflegend

matrix rV = r(V)
replace se = sqrt(rV[1,1]) if order==1
replace se = sqrt(rV[2,2]) if order==2
replace se = sqrt(rV[3,3]) if order==3
replace se = sqrt(rV[4,4]) if order==4
replace se = sqrt(rV[5,5]) if order==5
keep if coef != . & se != .
keep order coef se
save statements_coef1.dta, replace
restore



nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(us_gdp_growth=(-1(1)5)) atmeans noatlegend post coeflegend
preserve
gen order = _n
gen coef = .
gen se = .
replace coef = _b[1bn._at] if order==1
replace coef = _b[2._at] if order==2
replace coef = _b[3._at] if order==3
replace coef = _b[4._at] if order==4
replace coef = _b[5._at] if order==5
replace coef = _b[6._at] if order==6
replace coef = _b[7._at] if order==7
nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(us_gdp_growth=(-1(1)5)) atmeans post coeflegend

matrix rV = r(V)
replace se = sqrt(rV[1,1]) if order==1
replace se = sqrt(rV[2,2]) if order==2
replace se = sqrt(rV[3,3]) if order==3
replace se = sqrt(rV[4,4]) if order==4
replace se = sqrt(rV[5,5]) if order==5
replace se = sqrt(rV[6,6]) if order==6
replace se = sqrt(rV[7,7]) if order==7
keep if coef != . & se != .
keep order coef se
save statements_coef2.dta, replace
restore



nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(lag_log_gdp=(23.025850 25.328436 27.631021)) atmeans noatlegend post coeflegend
preserve
gen order = _n
gen coef = .
gen se = .
replace coef = _b[1bn._at] if order==1
replace coef = _b[2._at] if order==2
replace coef = _b[3._at] if order==3

nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(lag_log_gdp=(23.025850 25.328436 27.631021)) atmeans noatlegend post coeflegend
matrix rV = r(V)
replace se = sqrt(rV[1,1]) if order==1
replace se = sqrt(rV[2,2]) if order==2
replace se = sqrt(rV[3,3]) if order==3
keep if coef != . & se != .
keep order coef se
save statements_coef3.dta, replace
restore






nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(lag_latency_pilot=(0(1)1)) atmeans noatlegend post coeflegend
preserve
gen order = _n
gen coef = .
gen se = .
replace coef = _b[1bn._at] if order==1
replace coef = _b[2._at] if order==2

nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(lag_latency_pilot=(0(1)1)) atmeans noatlegend post coeflegend
matrix rV = r(V)
replace se = sqrt(rV[1,1]) if order==1
replace se = sqrt(rV[2,2]) if order==2
keep if coef != . & se != .
keep order coef se
save statements_coef4.dta, replace
restore



nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(lag_nwcapability=(0(1)1)) atmeans noatlegend post coeflegend
preserve
gen order = _n
gen coef = .
gen se = .
replace coef = _b[1bn._at] if order==1
replace coef = _b[2._at] if order==2

nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(lag_nwcapability=(0(1)1)) atmeans noatlegend post coeflegend
matrix rV = r(V)
replace se = sqrt(rV[1,1]) if order==1
replace se = sqrt(rV[2,2]) if order==2
keep if coef != . & se != .
keep order coef se
save statements_coef5.dta, replace
restore


nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(adv_signal_last3=(0(1)3)) atmeans noatlegend post coeflegend
preserve
gen order = _n
gen coef = .
gen se = .
replace coef = _b[1bn._at] if order==1
replace coef = _b[2._at] if order==2
replace coef = _b[3._at] if order==3
replace coef = _b[4._at] if order==4

nbreg statements_americas i.region postcw t t2 t3 log_cas us_gdp_growth lag_log_gdp lag_latency_pilot lag_nwcapability log_distance log_distance_us MID_movingavg_notinitiator MID_movingavg_aggressor lag_adversary_cinc lag_us_cinc provocation_new3 lag_democracy lag_log_trade lag_rivalry_thompson  lag_rivalry_shared lag_troops adv_signal_last3 if sample_cow==1, vce(cluster id)
margins, at(adv_signal_last3=(0(1)3)) atmeans noatlegend post coeflegend
matrix rV = r(V)
replace se = sqrt(rV[1,1]) if order==1
replace se = sqrt(rV[2,2]) if order==2
replace se = sqrt(rV[3,3]) if order==3
replace se = sqrt(rV[4,4]) if order==4
keep if coef != . & se != .
keep order coef se
save statements_coef6.dta, replace
restore

